export function validUsername(str:string) {
    const valid_map = ['admin', 'editor']
    return valid_map.indexOf(str.trim()) >= 0
}

export function validPwd(str:string) {
    var passwordreg =/^(?=.*[a-z])(?=.*\d)[^]{8,16}$/
    return passwordreg.test(str)
}
  